namespace :reports_notifies do

  desc "将原系统中的通知公告和讲座报告全部设置为已采用"
  task :update => :environment do
    reports = Report.all
    notifies = Notify.all
    reports.each do |report|
      p "=================old==reports===#{report.id}==================="
      report.update_attributes(:check => 2)
    end
    notifies.each do |notify|
      p "=================old==notifies===#{notify.id}==================="
      notify.update_attributes(:check => 2)
    end
  end

end